Skip to content

fix(access): resolve outstanding P0/P1 security and UX gaps#273

Closed
BigSimmo wants to merge 11 commits into
cursor/content-access-review-a385from
cursor/outstanding-fixes-f048
Closed

fix(access): resolve outstanding P0/P1 security and UX gaps#273
BigSimmo wants to merge 11 commits into
cursor/content-access-review-a385from
cursor/outstanding-fixes-f048

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses the highest-priority items from the outstanding issues review (P0/P1).

P0

  • RAG cache invalidation: invalidateRagCachesForDocumentMutation after enrichment reindex; invalidateRagCachesForOwner when the worker completes ingestion jobs.
  • Registry loading race (services): fall back to static serviceRecords while the registry API loads instead of rendering an empty list.
  • Search scope hardening: only bypass DB resolution for owner-scoped "all documents" when there are no explicit document IDs.

P1

  • Catalog rate limits: separate medications and differentials buckets instead of sharing registry.
  • Partial forms import: adds formRecords import (follow-up commit needed for full forms fallback UI).

Follow-up (not in this PR yet)

  • Forms search results fallback UI while registry loads
  • Upload assertSafeLocalProjectRequest wiring + test expectation updates
  • Document signed-url indexed-only gate; image signed-url owner-check ordering
  • /api/setup-status jsonError envelope
  • P2: gold-label backfill, eval thresholds, UI flakes
  • P3: governance docs, migration commit, verify:release

Verification

  • Targeted vitest: upload + signed URL routes pass on branch HEAD.
  • Full verify:cheap not re-run on final commit (ESLint missing-file issue on some worktrees).
Open in Web Open in Cursor 

BigSimmo and others added 10 commits July 3, 2026 21:00
The golden retrieval set was 100% lexical fast-path (embedding_skipped_rate=1.0), so
it could not measure whether a re-index changes vector/embedding retrieval quality.

- forceEmbedding option on searchChunksWithTelemetry (SearchChunksArgs): bypasses every
  lexical text-fast-path so retrieval always exercises the embedding/vector stage.
  Diagnostic/eval-only; folded into the search cache key; never set on production paths.
- eval-retrieval.ts: per-case `forceEmbedding` field + a global `--force-embedding` flag.
- 10 `vector-*` cases (psychiatric monographs: PTSD, OCD, panic, anorexia, GAD, Tourette,
  postnatal, bipolar, ADHD, opioid) with forceEmbedding=true. Each is a clinical query that
  must be answered by vector retrieval of the right monograph — verified live at
  document_recall@5=1.0, content_recall@5=1.0, all via strategy=hybrid (embedding used).

Rationale: forcing embedding is the correct instrument for re-index measurement — you want
to measure the vector index directly, not have a lexical shortcut mask a regression. Wording
alone can't reliably force the vector path (the fast-path is driven by emergent lexical-match
strength), so the flag makes these probes deterministic.

Live golden eval: 34/34 pass (24 existing + 10 new), no regression. verify:cheap green (980).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wire forceEmbedding through eval runners and retrieval cache keys, bypass coverage/lexical shortcuts when forced, and add golden-case failure metrics so vector regressions cannot hide behind text-fast-path or cache hits.
Create missing retrieval-support indexes (trgm, composite btree, partial
miss log) that were absent or only present under legacy names on live.
Update search_schema_health() to accept verified functional equivalents
during rollout. Set search_path for pg_trgm gin_trgm_ops in extensions.

Verified on linked project: search_schema_health() ok=true, missing=[].
…board

Delete post-extraction dead code left in the monolith and trim unused imports. Also fix minor lint issues in favourites-hub, visual-evidence, and services-navigator.
- Hide footer Evidence/Sources chips on phone hero composers; scope stays in + menu
- Suppress bottom-dock composer flash until hero portal slot is ready
- Increase composer action/send touch targets to 44px on phones
- Update Playwright tests for scope menu, Answer home geometry, and stress fallback
@supabase

supabase Bot commented Jul 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo

BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Organizing open PRs (Jul 6): Base access rollout landed on main via #274. This draft conflicts with current main — rebase onto main or close if changes are already included.

@BigSimmo
BigSimmo marked this pull request as ready for review July 5, 2026 17:20
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@BigSimmo

BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded by merged work on \main:

Production is live with these fixes. Any remaining unique commits should be cherry-picked onto a fresh branch from current \main.

@BigSimmo BigSimmo closed this Jul 5, 2026
@BigSimmo
BigSimmo deleted the cursor/outstanding-fixes-f048 branch July 9, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant